<!DOCTYPE html>
<!--<extend name="Base/base" />-->
<block name='head'>  
    <meta charset="utf-8">
    <link href="/Public/Index/css/diary.css" rel="stylesheet" /> 
</block>
<block name="content" > 
    <form name='form1'>
        <div class="bd">
            <div class="trip_title">
                <p align='center'>新建工作日志</p>
            </div>
            <div class="work_cells trip_next">
                <table>
                    <tr>
                        <td class="key">日志标题</td>
                        <td class="value">
                            <input type="text" class="dateTime diay1" value="{$sub}" id="date">
                            <input type="hidden" id="url" value="{:U('getDate')}">
                            <input type="hidden" id="currDate" name="SUBJECT" value="{$sub}">
                            <!--<a href="javascript:;" class="orgClear" onClick="document.form1.SUBJECT.value=''">-清空</a>-->
                        </td>
                    </tr>
                    <tr>
                        <td class="key">日志类型</td>
                        <td class="value">
                            <select name="DIA_TYPE" class=" diay2">
                                <option value="1">工作日志</option>
                                <option value="2">个人日志</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="key">是否共享</td>
                        <td class="value">
                            <input type="checkbox" name="TO_ALL" style='width:16px;'>允许对所有人共享
                        </td>
                    </tr>
                    <tr>
                        <td class="key">日志内容</td>
                        <td class="value">
                            <textarea name="CONTENT" id="cont" style="width:85%;height:10em;"></textarea>
                        </td>
                    </tr>
                    <!--                    <tr>     
                                            <td class="TableData" colspan="3" style="text-align:left;padding-left:0px">
                    
                                            </td>
                                        </tr> -->
                    <tr>
                        <td class="TableHeader" colspan="2"><div onClick="share();" title="点击展开/收缩选项" style="cursor:pointer;width:125px;"><img class="arrow" src="/Public/Index/img/right.png" align="absMiddle"> 指定共享范围</div></td>
                    </tr>       
                    <tr id="share" style="display:none">
                        <td nowrap class="TableData">共享范围：</td>
                        <td class="TableData value">
                            <p class="textarea" style="border:1px solid #ddd;width:50%; margin: 10px 0; background:#fff;"><span></span></p>
                            <a class="pointer addUser addUser_1" data-id="1">+添加 </a>
                            <a class="pointer delData">-清空</a>
                            <a href="#" class="orgAdd" onClick="document.getElementById('TO_NAME').value = document.getElementById('Share_Name').value;document.getElementById('TO_ID').value = document.getElementById('Share_ID').value;"> </a>

                        </td>
                    </tr>
                </table>
            </div>
            <div class="button" align="center">
                <span>
                    <a class="pointer btn-submit ajax-post" data-verify="all" data-url="{:U('addDiary')}" data-form="">提交</a>
                    <!--<a class="pointer btn-submit ajax-post" data-verify="all" data-url="{:U('addDiary',array('DIA_TYPE'=>1))}" data-form="">保存</a>-->
                </span>
            </div>
        </div>
    </form>
    <div class="button">
        <a class="am-btn" onclick="history.go(-1)">返 回</a>
    </div>

</block>
<block name="script">
    <script type="text/javascript" src="/Public/Index/js/diary.js"></script>
    <link rel="stylesheet" type="text/css" href="/Public/static/datetimepicker-master/jquery.datetimepicker.css">
    <script type="text/javascript" src="/Public/static/datetimepicker-master/jquery.datetimepicker.js" ></script>
    <script type="text/javascript">
//            $(dateTime());
            $(initAddDiary());
            
    </script>
    <script>
        function share() {
            var obj = document.getElementById("share");
            if (obj.style.display == 'none') {
                obj.style.display = '';
                $('.arrow').attr('src', '/public/Index/img/down2.png');
            } else {
                obj.style.display = 'none';
                $('.arrow').attr('src', '/Public/Index/img/right.png');
            }
        }


    </script>
</block>
